/* ********************************************************** */
/*!	
	\brief Return the data pin state

	\note Checks MISO bit state. 

	\return 1 if bit set, otherwise zero

	\author Joe Pardue 
	\date October 29, 2010
	\version 1.00
*/
/* ********************************************************** */
uint8_t spi_soft_get_miso_bit()
{
   if (miso_port_pins & (1<<miso_port_pin))
   {
     return 1;
   }
   else return 0;
}


/* ********************************************************** */
/*!	
	\brief Toggles the SCLK line

	\note Hardwired _delay_ms(0.2) is a swag. 

	\author Joe Pardue 
	\date October 29, 2010
	\version 1.00
*/
/* ********************************************************** */
// Toggle the clock
void spi_soft_toggle_sclk()
{
	// Serial bit shifted in on rising clock
   sclk_port |= (1<<sclk_port_pin); 

   // Give some time to react
   _delay_ms(0.2);

   // Set the clock back to 0
   sclk_port &= ~(1<<sclk_port_pin);
}

